Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce startup overhead #2763

Merged
merged 6 commits into from
Jan 17, 2024
Merged

Reduce startup overhead #2763

merged 6 commits into from
Jan 17, 2024

Conversation

brentyi
Copy link
Collaborator

@brentyi brentyi commented Jan 14, 2024

Some changes to reduce startup overhead!

For just printing the helptext, from $ time ns-train --help,

  • Before: 10.00s user 5.89s system 166% cpu 9.519 total
  • After: 2.75s user 1.62s system 156% cpu 2.797 total

The biggest chunk of this was from making some less-used imports lazy. Some examples of things that mattered:

  • torchvision took 0.5~0.6 seconds to import. (most of which was extensions for the ConvNeXt model...)
  • comet_ml required 0.3~0.4 seconds.
  • diffusers required 0.4~0.5 seconds.
  • open3d required 0.4~0.5 seconds.

(we should ideally do some of this profiling in the CI)

I also bumped to the faster viser version (from nerfstudio-project/viser#159) and cleaned up some CLI things, where we were creating unnecessary subparsers for deprecated config fields.

@brentyi brentyi requested a review from tancik January 14, 2024 08:01
Copy link
Collaborator

@kerrj kerrj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@brentyi brentyi enabled auto-merge (squash) January 17, 2024 01:28
@brentyi brentyi merged commit 05d3054 into main Jan 17, 2024
4 checks passed
@brentyi brentyi deleted the brent/reduce_import_overhead branch January 17, 2024 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants